package com.rs.tools;

import java.io.File;
import java.io.IOException;

import com.rs.game.player.Player;
import com.rs.utils.SerializableFilesManager;

public class PenguinReseter {

		public static void main(String[] args) throws ClassNotFoundException, IOException {
			File[] chars = new File("data/playersaves/characters").listFiles();
			for (File acc : chars) {
				try {
					Player player = (Player) SerializableFilesManager
							.loadSerializedFile(acc);
					player.penguin1 = 0;
					player.penguin2 = 0;
					player.penguin3 = 0;
					player.penguin4 = 0;
					player.penguin5 = 0;
					player.penguin6 = 0;
					player.penguin7 = 0;
					player.totalpenguins = 0;
					player.ClaimedReward = false;
					player.trollReward = false;
					SerializableFilesManager
					.storeSerializableClass(player, acc);
				} catch (Throwable e) {
					e.printStackTrace();
					System.out.println("failed resetting: " + acc.getName());
				}
			}
			System.out.println("Done Resetting.");
		}
	}